import {CrisisService} from "../../services/crisis.service";
import {Component, OnInit} from "@angular/core";
import {Crisis} from "../../models/crisis";

@Component({
  templateUrl: './crisis-list.component.html'
})
export class CrisisListComponent implements OnInit {

  crises: Crisis[];

  constructor(private crisisService: CrisisService) {
  }

  ngOnInit(): void {
    this.crisisService.getCrises().subscribe(crises=> {
      this.crises = crises;
    })
  }
}
